package com.actions.bluetoothbox2.app;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;

import com.actions.bluetoothbox2.R;

public class WelcomeActivity extends Activity {

    int time = 0;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_welcome);

        new Mythread().start();
    }

    class Mythread extends Thread {
        @Override
        public void run() {
            super.run();
            while (true) {
                time++;
                if (time == 5) {
                    Intent intent = new Intent(WelcomeActivity.this, BrowserActivity.class);
                    startActivity(intent);
                    finish();
                   return;
                }
                try {
                    sleep(1000);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }
        }
    }
}
